package com.tvunetworks.center.user.model.param.api;

import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang.StringUtils;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @program: tvucc-aggregator
 * @description: AddGridEventParam
 * @author lebronchen
 * @create: 2020-01-03 13:35
 **/
@Data
@Accessors(chain = true)
public class AddGridEventParam {

    @NotEmpty
    @Size(max = 32)
    private String taskId;
    @NotEmpty
    @Size(max = 32)
    private String eventId;
    @NotEmpty
    @Size(max = 32)
    private String gridPeerId;
    @NotEmpty
    @Size(max = 64)
    private String email;
    @NotEmpty
    @Size(max = 16)
    private String receiverPeerId;
    @NotNull
    private Long startTime;
    @NotNull
    private Long endTime;
    @NotNull
    private Long prePairTime;
    @Size(max = 128)
    private String origin;
    @Size(max = 256)
    private String remark;

    /**
     *  formatParam
     */
    public void formatParam(){
        gridPeerId = StringUtils.lowerCase(gridPeerId);
        receiverPeerId = StringUtils.lowerCase(receiverPeerId);
    }

}
